package com.rookie.demo.action;

import com.rookie.demo.service.DemoService;
import com.rookie.mvc.annotation.*;
import com.rookie.mvc.enums.RequestMethod;

/**
 * \* DemoAction
 * \* @name: DemoAction
 * \* @author: 12093
 * \* @date: 2018/9/26
 * \* @time: 15:25
 * \
 */
@Action
@Request("demo")
public class DemoAction {

    @AutoWired
    private DemoService demoService;

    @Request(value = "get", method = RequestMethod.GET)
    @Response()
    public String hello(String key){
        System.out.println("key: " + key);
        return demoService.get(key);
    }

}